/**
 * 用于存放过滤器相关信息
 */
/**
 * @author yangwc
 *
 */
package com.im.filter;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.filter.CharacterEncodingFilter;

@Configuration
public class FilterConfig {
	
	/**
	 * 字符编码级设置，
	 * 一般默认pom.xml里面的配置
	 * project.reporting.outputEncoding
	 * project.build.sourceEncoding
	 * @return
	 */

	@Bean
	public CharacterEncodingFilter characterEncodingFilter() {
		CharacterEncodingFilter characterEncodingFilter = new CharacterEncodingFilter();
		characterEncodingFilter.setEncoding("UTF-8");
		characterEncodingFilter.setForceEncoding(true);
		return characterEncodingFilter;
	}

}